import time
from page.goods_page import GoodsList
from common.base import open_browser
from page.goods_page import url

#创建类
class LoginScript:
    def __init__(self,driver):
        """导入浏览器和实例化page"""
        self.goods = GoodsList(driver)
        self.goods.open_url(url)
    def choice(self):
        """点击全部商品并返回"""
        self.goods.get_goods_titles()
        self.goods.click_goods_all()
        time.sleep(3)
        self.goods.back()
if __name__ == '__main__':
    driver=open_browser()
    good=LoginScript(driver)
    driver.quit()








